package com.ethink.system.api;

import com.ethink.system.api.info.SystemMenuInfo;
import com.ethink.system.api.request.SystemMenuAddRequest;
import com.ethink.system.api.request.SystemMenuQueryRequest;
import com.ethink.system.api.request.SystemMenuUpdateRequest;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * 系统菜单表 Facade接口
 *
 * @author default
 * @date 2022-09-26
 */
@FeignClient(name = "ethink-system-service", path = "system-service/facade/v1/systemMenu", contextId = "systemMenuFacade")
public interface SystemMenuFacade {

    @PostMapping("/systemMenu/list")
    @ResponseBody
    List<SystemMenuInfo> getSystemMenuList(@RequestBody SystemMenuQueryRequest request);

    @GetMapping("/systemMenu/detail")
    @ResponseBody
    SystemMenuInfo getSystemMenuById(@RequestParam("systemMenuId") Long systemMenuId);

    @PostMapping("/systemMenu/add")
    @ResponseBody
    void addSystemMenu(@RequestBody SystemMenuAddRequest request);

    @PostMapping("/systemMenu/update")
    void updateSystemMenu(@RequestBody SystemMenuUpdateRequest request);

    @GetMapping("/systemMenu/delete")
    void deleteSystemMenu(@RequestParam("systemMenuId") Long systemMenuId);

}